package com.ktjy.service.impl;

import com.ktjy.entity.SysUser;
import com.ktjy.mapper.SysUserMapper;
import com.ktjy.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 黄军艳
 * @version 1.0
 * @date 2024/12/16  9:33
 */
@Service("sysUserService")
public class SysUserServiceImpl implements SysUserService {
    @Autowired
    SysUserMapper sysUserMapper;
    @Override
    public SysUser login(String account, String password) {
        SysUser sysUser=sysUserMapper.getByAaccount(account);
        //匹配密码
        if(null!=sysUser){
            if (sysUser.getPassword().equals(password)) {
                return sysUser;
            }
        }
        return null;
    }
}
